//
//  FullMainHeadCollectionReusableView.m
//  tangshantongjiAPPFull
//
//  Created by yuntai on 2018/4/20.
//  Copyright © 2018年 yuntai. All rights reserved.
//

#import "FullMainHeadCollectionReusableView.h"
#import "AdView.h"

@implementation FullMainHeadCollectionReusableView

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)configHeadViewWithArray:(NSArray *)tempurl titles:(NSArray *)temptitle seleIndex:(void(^)(NSInteger index))selIndexBlock{
    
    if(tempurl.count == 0 || temptitle.count == 0){
        return;
    }
    self.bannerView = [AdView adScrollViewWithFrame:CGRectMake(0, 0, kScreenBoundWidth, kScreenBoundWidth*0.6) imageLinkURL:tempurl placeHoderImageName:@"Default_Life21" pageControlShowStyle:UIPageControlShowStyleRight];
    
    [self.bannerView setAdTitleArray:temptitle withShowStyle:AdTitleShowStyleLeft];
    
    self.bannerView.adMoveTime = 3.f;
    
    self.bannerView.callBack = ^(NSInteger index,NSString * imageURL)
    {
        selIndexBlock(index);
    };
    
    [self addSubview:self.bannerView];
    

}
@end
